﻿//////////////////////////////////////////////////////////////////////////////
//
//  Copyright © 1998-2024 Glodon Company Limited.  All rights reserved.
//
//  Use of this software is subject to the terms of the Glodon license
//  agreement provided at the time of installation or download, or which
//  otherwise accompanies this software in either electronic or hard copy form.  
//
//////////////////////////////////////////////////////////////////////////////

// Reviewed

#pragma once

#include "GcmpGeometryInterface.h"
#include "CurveCurveIntersectTypes.h"

namespace gcmp
{
    class Vector2d;
    class ICurve2dCoincidenceData;

    /// \brief 二维曲线与二维曲线的相交数据
    ///
    class GCMP_GEOMETRY_INTERFACE_EXPORT ICurve2dCurve2dIntersection
    {
    public:
        /// \brief  获取相交的类型
        ///
        /// \return 相交类型
        virtual CurveCurveIntersectTypes GetIntersectType() const = 0;

        /// \brief  获取交点在第一条曲线上参数
        ///
        /// \return 返交点在第一条曲线上参数
        virtual double GetParamOnFirstCurve() const = 0;

        /// \brief  获取交点在第二条曲线上参数
        ///
        /// \return 交点在第二条曲线上参数
        virtual double GetParamOnSecondCurve() const = 0;

        /// \brief  获取交点坐标
        ///
        /// \return 交点坐标
        virtual Vector2d GetIntersectPoint() const = 0;

        /// \brief  获取重合段数据（相交类型为重合时调用）
        ///
        /// \return 重合段数据（相交类型不为重合，返回空指针）
        virtual const ICurve2dCoincidenceData* GetCurve2dCoincidenceData() const = 0;

    };
}

